# 设计散点图
import numpy as np
import matplotlib.pyplot as plt

# --------------  散点图----------------
w = 3 # 未知状态
b = 0 # 忽略b  未知状态

x = np.arange(0,7)
noise = np.random.rand(len(x)) * 2
y = w * (x + noise) + (b + noise)

plt.plot(x,y,'ro')

plt.show()

